Functions | Variables
Grab_LineStart Namespace Reference

Functions

def decoding_char (ctypes_char_array)
 
def work_thread (cam=0, pData=0, nDataSize=0)
 

Variables

 currentsystem = platform.system()
 
 input_func = raw_input
 
bool g_bExit = False
 
 SDKVersion = MvCamera.MV_CC_GetSDKVersion()
 
 device_list = MV_CC_DEVICE_INFO_LIST()
 
tuple t_layer_type
 
 ret = MvCamera.MV_CC_EnumDevices(t_layer_type, device_list)
 
 mvcc_dev_info = cast(device_list.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents
 
def strModeName = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chModelName)
 
def strSerialNumber = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chSerialNumber)
 
tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)
 
tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)
 
tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)
 
tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)
 
 connection_number = input_func("please input the number of the device to connect:")
 
 cam = MvCamera()
 
 current_device_info = cast(device_list.pDeviceInfo[int(connection_number)], POINTER(MV_CC_DEVICE_INFO)).contents
 
 nPacketSize = cam.MV_CC_GetOptimalPacketSize()
 
 b_enable = c_bool(False)
 
 thread_handle = threading.Thread(target=work_thread, args=(cam, None, None))
 

Function Documentation

◆ decoding_char()

def Grab_LineStart.decoding_char (   ctypes_char_array)
Safely decode a string from a ctypes character array.
Compatible with Python 2.x and 3.x, as well as 32-bit and 64-bit environments.

◆ work_thread()

def Grab_LineStart.work_thread (   cam = 0,
  pData = 0,
  nDataSize = 0 
)

Variable Documentation

◆ currentsystem

currentsystem = platform.system()

◆ input_func

input_func = raw_input

◆ g_bExit

bool g_bExit = False

◆ SDKVersion

SDKVersion = MvCamera.MV_CC_GetSDKVersion()

◆ device_list

device_list = MV_CC_DEVICE_INFO_LIST()

◆ t_layer_type

tuple t_layer_type
Initial value:
1 = (MV_GIGE_DEVICE | MV_USB_DEVICE | MV_GENTL_CAMERALINK_DEVICE
2  | MV_GENTL_CXP_DEVICE | MV_GENTL_XOF_DEVICE)

◆ ret

ret = MvCamera.MV_CC_EnumDevices(t_layer_type, device_list)

◆ mvcc_dev_info

mvcc_dev_info = cast(device_list.pDeviceInfo[i], POINTER(MV_CC_DEVICE_INFO)).contents

◆ strModeName

def strModeName = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chModelName)

◆ strSerialNumber

def strSerialNumber = decoding_char(mvcc_dev_info.SpecialInfo.stGigEInfo.chSerialNumber)

◆ nip1

tuple nip1 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0xff000000) >> 24)

◆ nip2

tuple nip2 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x00ff0000) >> 16)

◆ nip3

tuple nip3 = ((mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x0000ff00) >> 8)

◆ nip4

tuple nip4 = (mvcc_dev_info.SpecialInfo.stGigEInfo.nCurrentIp & 0x000000ff)

◆ connection_number

connection_number = input_func("please input the number of the device to connect:")

◆ cam

cam = MvCamera()

◆ current_device_info

current_device_info = cast(device_list.pDeviceInfo[int(connection_number)], POINTER(MV_CC_DEVICE_INFO)).contents

◆ nPacketSize

nPacketSize = cam.MV_CC_GetOptimalPacketSize()

◆ b_enable

b_enable = c_bool(False)

◆ thread_handle

thread_handle = threading.Thread(target=work_thread, args=(cam, None, None))